package openbang.common.vo;

/**
 * 
 * 支持的数据类型定义 : 
 * 
 * @author aibo zeng
 *
 */

public enum DataTypeEnum {
	String (10,"String"),
	Integer(20,"Int"),
	Long(21,"Long"),
	Double(30,"Double"),
	Date(40,"Date"),
	DateTime(41,"DateTime"),
	Object(99,"Object");


	private Integer code;
	private String desc;
	
	private DataTypeEnum(Integer code,String desc) {
		this.code = code;
		this.desc = desc;
	}
	public int getCode() {
		return code;
	}
	public String getDesc(){
		return desc;
	}
	
	public static String getDesc(Integer code) {
		for(DataTypeEnum each : DataTypeEnum.values()) {
			if(each.getCode()==code)
				return each.getDesc();
		}		
		return "";
	}
}
